package com.anyonavinfo.cpaddemo.data.timeinfo.source;

/**
 * Created by Administrator on 2017/2/2.
 */

public class TimeInfoRepository implements TimeInfoDataSource{

    private static TimeInfoRepository INSTANCE = null;
    private TimeCalculator mTimeCal;

    public static TimeInfoRepository getInstance() {
        if (INSTANCE == null) {
            INSTANCE = new TimeInfoRepository();
        }
        return INSTANCE;
    }

    private TimeInfoRepository(){
        mTimeCal = TimeCalculator.getInstance();
    }





    @Override
    public void getTimeInfo(GetTimeInfoCallBack callBack) {
        callBack.onGetTimeInfo(mTimeCal.calCurTime());
    }
}
